<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateMayPromoCouponsTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('may_promo_coupons', function(Blueprint $table)
		{
			$table->increments('id');
			$table->string('code', 30)->nullable()->comment('随机券号唯一');
			$table->integer('wechat_user_id')->nullable();
			$table->string('title', 30)->nullable()->comment('标题');
			$table->string('desc', 100)->nullable()->comment('描述');
			$table->decimal('discount')->nullable()->comment('金额');
			$table->boolean('is_used')->nullable()->default(0)->comment('购物券是否已使用，0 未使用 1已使用');
			$table->timestamps();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('may_promo_coupons');
	}

}
